package com.webchat.search.controller;


import com.webchat.common.bean.APIResponseBean;
import com.webchat.common.bean.APIResponseBeanUtil;
import com.webchat.search.service.es.WebChatElasticSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/api/search")
public class SearchController {

    @Autowired
    private WebChatElasticSearchService webChatElasticSearchService;


    @GetMapping("/createIndex")
    public APIResponseBean<Boolean> createChatMessageIndex() {
//        boolean createIndexResult = webChatElasticSearchService.createIndex();
//        return APIResponseBeanUtil.success(createIndexResult);
        return null;
    }

    @GetMapping("/deleteIndex")
    public APIResponseBean<Boolean> deleteIndex() {
//        boolean createIndexResult = webChatElasticSearchService.deleteIndex();
//        return APIResponseBeanUtil.success(createIndexResult);
        return null;
    }
}
